From a6774264ee6203ba68fa273c0c6c63e75beaf5cf Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 1 Mar 2002 21:53:22 +0000 Subject: [PATCH] Initialize the scrollbar spacing variable in the class to -1, and then Fri Mar 1 16:48:19 2002 Owen Taylor * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing variable in the class to -1, and then take that to mean "default" (3) rather than putting 3 in the class directly. This gives us some wiggle room to make it a per-instance rather than a per-class property later. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkscrolledwindow.c | 8 +++++--- 8 files changed, 61 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b7d7d8814e..cc5147045e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Fri Mar 1 16:48:19 2002 Owen Taylor + + * gtk/gtkscrolledwindow.c: Initialize the scrollbar spacing + variable in the class to -1, and then take that to mean + "default" (3) rather than putting 3 in the class directly. + This gives us some wiggle room to make it a per-instance + rather than a per-class property later. + 2002-03-01 jacob berkman * Makefile.am (install-data-hook): diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 2e48e668f6..299ef5be66 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -67,9 +67,11 @@ * under A) at least correspond to the space taken up by its scrollbars. */ -#define SCROLLBAR_SPACING(w) (GTK_SCROLLED_WINDOW_GET_CLASS (w)->scrollbar_spacing) +#define DEFAULT_SCROLLBAR_SPACING 3 -#define DEFAULT_SCROLLBAR_SPACING 0 +#define SCROLLBAR_SPACING(w) \ + (GTK_SCROLLED_WINDOW_GET_CLASS (w)->scrollbar_spacing >= 0 ? \ + GTK_SCROLLED_WINDOW_GET_CLASS (w)->scrollbar_spacing : DEFAULT_SCROLLBAR_SPACING) enum { PROP_0, @@ -223,7 +225,7 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class) container_class->remove = gtk_scrolled_window_remove; container_class->forall = gtk_scrolled_window_forall; - class->scrollbar_spacing = DEFAULT_SCROLLBAR_SPACING; + class->scrollbar_spacing = -1; class->scroll_child = gtk_scrolled_window_scroll_child; class->move_focus_out = gtk_scrolled_window_move_focus_out; -- 2.30.2